package com.kt.network.net

import com.kt.NetworkModel.bean.*
import com.kt.network.bean.BaseResult
import com.kt.network.bean.FontDataNew
import io.reactivex.Observable
import okhttp3.RequestBody
import okhttp3.ResponseBody
import retrofit2.http.*

interface ApiService {
    /**
     * 登录接口
     */
    @POST(ApiAddress.LOGIN)
    fun Login(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<LoginBean>>

    /**
     * 获取司机信息接口
     */
    @POST(ApiAddress.QUICKMESSAGE)
    fun quickmessage(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<QuickMessageBean>>

    /**
     * 获取司机信息接口
     */
    @POST(ApiAddress.DRIVERUPDATETRANSITDRIVERINFO)
    fun driverUpdateTransitDriverInfo(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<TransitArriveStartingPointBean>>

    /**
     * 在线时常
     */
    @POST(ApiAddress.ONLINETIME)
    fun getonlinetime(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<OnlineBean>>

    /**
     * 累计订单数统计
     */
    @POST(ApiAddress.CUMULATIVE)
    fun getcumulative(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<CumulativeBean>>

    /**
     * 查询司机当前任务信息
     */
    @POST(ApiAddress.QUERYINFORMATION)
    fun getinformation(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<InformationBean>>

    /**
     * 查询上一次任务信息
     */
    @POST(ApiAddress.QUERYABOUTINFORMATION)
    fun getaboutinformation(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<InformationBean>>


    /**
     * 周月累计时长统计
     */
    @POST(ApiAddress.CUMULATIVEDUARTION)
    fun getcumulativenduartion(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<CumulativenduartionBean>>

    /**
     * 周/月评分
     */
    @POST(ApiAddress.SCORESTATISTICS)
    fun getscorestatistics(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<ScorestatisticsBean>>

    /**
     * 修改密码
     */
    @POST(ApiAddress.CHANGEPASSWORD)
    fun getchangepassword(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<ChangePasswordBean>>

    /**
     * 修改手机号
     */
    @POST(ApiAddress.CHANGEPATHONENUMBER)
    fun getchangepathonenumber(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<ChangePasswordBean>>

    /**
     * 意见反馈
     */
    @POST(ApiAddress.SAVEFEEDBACK)
    fun savefeedback(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<ChangePasswordBean>>

    /**
     * 订单列表查询
     */
    @POST(ApiAddress.QUERYDRIVERTRANSITORDERLIST)
    fun queryDriverTransitOrderList(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<MutableList<queryDriverTransitOrderListBean>>>

    /**
     * 查询订单详情
     */
    @POST(ApiAddress.QUERYTRANSITORDER)
    fun queryTransitOrder(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<QuerydrivertranstiorBean>>

    /**
     * 地址查询
     */
    @POST(ApiAddress.QUERYADDRESS)
    fun queryAddress(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<MutableList<MyAddressBean>>>


    /**
     * 司机查询排班任务
     */
    @POST(ApiAddress.DRIVER_QUERY_TRANSIT_SCHEDULE_PLAN_LIST)
    fun driverQueryTransitSchedulePlanList(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<ResultListBean<ToDayWorkTaskBean>>>

    /**
     * 司机确认开始任务
     */
    @POST(ApiAddress.CONFIRMTRANSITSCHEDULEPLAN)
    fun confirmTransitSchedulePlan(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**
     * 查询司机所有排班日期
     */
    @POST(ApiAddress.QUERYSCHEDULEPLANDATELIST)
    fun querySchedulePlanDateList(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<MutableList<String>>>

    /**
     * 司机确认结束任务
     */
    @POST(ApiAddress.FINISHTRANSITSCHEDULEPLAN)
    fun finishTransitSchedulePlan(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**
     * 任务详情页查询任务信息
     */
    @POST(ApiAddress.QUERYPASSENGERBYSITE)
    fun queryPassengerBySite(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<QueryPassengerBySiteBean>>

    /**
     * 查询区域坐标集合
     */
    @POST(ApiAddress.QUERYTRANSITFENCEAREACOORDINATE)
    fun queryTransitFenceAreaCoordinate(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<MutableList<QueryTransitFenceAreaCoordinateBean>>>

    /**
     * 任务详情页查询任务信息
     */
    @POST(ApiAddress.SQUERYPASSENGERBYSITE)
    fun squeryPassengerBySite(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<SqueryPassengerBySiteBean>>

    /**
     * 司机端订单列表查询
     */
    @POST(ApiAddress.SQUERYDRIVERTRANSITORDERLIST)
    fun squeryDriverTransitOrderList(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<BqueryBean<BQueryDriverTransitOrderListBean>>>

    /**
     * 司机到达站点
     */
    @POST(ApiAddress.TRANSITARRIVESTARTINGPOINT)
    fun transitArriveStartingPoint(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**
     * 司机确认乘客上车
     */
    @POST(ApiAddress.GETONTRANSIT)
    fun getOnTransit(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**
     * 用户超时未上车司机取消订单
     */
    @POST(ApiAddress.CANCELTIMEOUTORDER)
    fun cancelTimeoutOrder(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**图片视屏上传*/
    @POST(ApiAddress.IMAGE_UPLOAD)
    suspend fun uploadFile(@Body body: RequestBody): ResponseBody

    /**
     * 司机更新个人信息
     */
    @POST(ApiAddress.DRIVERUPDATETRANSITDRIVERINFO)
    suspend fun driverUpdateTransitDriverLogoInfo(@Body params: @JvmSuppressWildcards Map<String, Any>): BaseResult<String>

    /**
     * 车辆人数统计
     */
    @GET(ApiAddress.QUERY_TRANSIT_SEAT_STATISTICS)
    fun queryTransitSeatStatistics(@Query("taskId") taskId: String, @Query("taskState") taskState: String = "3"): Observable<BaseResult<QueryTransitSeatStatisticsBean>>

    /**
     * 司机端实时记录车辆位置
     */
    @POST(ApiAddress.SAVETRANSITPOSITIONINFO)
    fun saveTransitPositionInfo(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<TransitArriveStartingPointBean>>

    /**
     * 继续行程
     */
    @POST(ApiAddress.UPDATEDRIVERNEXTSITE)
    fun updateDriverNextSite(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**
     * 确认乘客下车
     */
    @POST(ApiAddress.ARRIVETRANSIT)
    fun arriveTransit(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**
     * 确认乘客下车
     */
    @POST(ApiAddress.QUERYDRIVERORDERSTATISTICSBYTASK)
    fun queryDriverOrderStatisticsByTask(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<QueryDriverOrderStatisticsByTaskBean>>

    /**
     * 查询司机提示语【司机点弹窗触发后台关闭弹窗接口 后台设置关闭】【需要定时任务定时查询】
     */
    @POST(ApiAddress.QUERY_TRANSIT_PROMPT)
    fun queryTransitPromptNet(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<QueryTransitPromptBean>>

    /**
     * 查询司机提示语【司机点弹窗触发后台关闭弹窗接口 后台设置关闭】【需要定时任务定时查询】
     */
    @POST(ApiAddress.UPDATE_DIVER_RECEIVE_ORDER)
    fun updateDiverReceiveOrder(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**
     * 查询司机提示语【司机点弹窗触发后台关闭弹窗接口 后台设置关闭】【需要定时任务定时查询】
     */
    @POST(ApiAddress.QUERY_TRANSIT_ROUTE)
    fun queryTransitRoute(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<MutableList<QueryTransitRouteBean>>>

    /**
     * 关闭弹窗通知
     */
    @POST(ApiAddress.UPDATE_TRANSIT_PROMPT)
    fun updateTransitPrompt(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**
     * 结束排班
     */
    @POST(ApiAddress.CANCEL_TRANSIT_SCHEDULE_PLAN)
    fun cancelTransitSchedulePlan(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>

    /**
     * 到达站点后获取倒计时
     */
    @POST(ApiAddress.GET_SITE_COUNT_DOWN)
    fun getSiteCountdown(@Body params: @JvmSuppressWildcards Map<String, Any>): Observable<BaseResult<String>>
    //******************************************************************************************************************


    /**
     * 首页文章
     */
    @GET(ApiAddress.CALLBACK)
    suspend fun callback(): BaseResult<FontDataNew>

    /**
     * 轮播图
     */
    @GET(ApiAddress.BANNER)
    suspend fun banner(): BaseResult<MutableList<WBanner.Data>>

    /**
     * 项目分类
     */
    @GET(ApiAddress.PROJECT)
    suspend fun project(): BaseResult<MutableList<ProjectBean.Data>>

    /**
     * 项目列表数据
     */
    @GET("project/list/{page}/json?")
    suspend fun project_content(
        @Path("page") page: Int, @Query("cid") cid: Int
    ): BaseResult<TabFrameBean.Data>

    /**
     * 下载接口
     */
    @Streaming
    @GET
    suspend fun downloadFile(@Url url: String): Any?


//    /**
//     * get
//     */
//    @GET(ApiAddress.LOGIN)
//    suspend fun login(
//        @Query("account") account: String,
//        @Query("password") password: String
//    ): BaseResponse<Any>
//
//
//    /**
//     * post body
//     */
//    @POST(ApiAddress.LOGIN)
//    suspend fun loginBody(@Body requestBody: RequestBody): BaseResponse<Any>
} 